<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Article List</title>
</head>
<body>
	<div align="center">
		<h3>
			<font color="red">文章列表</font>
		</h3>
	</div>
	<table width="800" border=1 cellpadding=0 cellspacing=0 align="center">
		<caption>${pager.toString()}</caption>
		<tr>
			<th width="10%">序号</th>
			<th width="25%">标题</th>
			<th width="15%">栏目</th>
			<th width="15%">发布人</th>
			<th width="20%">发布时间</th>
		</tr>
		<s:iterator value="pager.data" status="a">
			<tr>
				<td><s:property value="#a.index+1" /></td>
				<td><a href="detail.action?id=<s:property value="id"/>">
				    <s:if test="title.length()>16">
						<s:property value="title.substring(0, 16)+'...'" />
					</s:if> 
					<s:else>
					     <s:property value="title" />
					</s:else> 
				</a></td>
				<td><s:property value="channel.getName()" /></td>
				<td><s:property value="author" /></td>
				<td><s:property value="addtime" /></td>
			</tr>
		</s:iterator>
	</table>
	<div align="center">
		<a href="./admin/">后台入口</a>
	</div>
</body>
</html>